<?php
		require('config.php');
		$user_id=$_REQUEST['user_id'];
		$address_id=$_REQUEST['address_id'];
		
		$sql="update ".$oto."_user_address set isDefault='0' where userId='{$user_id}'";
		$result=$db->query($sql);
		$sql2="update ".$oto."_user_address set isDefault='1' where userId='{$user_id}' and addressId='{$address_id}'";
		$result2=$db->query($sql2);
		if($result2)
		{
			$data[0]['pan']="true";
		}
		else $data[0]['pan']="false";
		echo json_encode($data);
?>